#ifndef CELLCOORDINATES_H_
#define CELLCOORDINATES_H_

namespace physicsworks {

/**
 * Represents the cell's coordinates for the uniform grids.
 */
class CellCoordinates {
public:
	int x;
	int y;
	int z;
	
	CellCoordinates(const CellCoordinates& c) : x(c.x), y(c.y), z(c.z) {}
	CellCoordinates(int x, int y, int z) : x(x), y(y), z(z) {}
	
	CellCoordinates getEast() const { return CellCoordinates(x, y+1, z); }
	CellCoordinates getSouthEast() const { return CellCoordinates(x, y+1, z-1); }
	CellCoordinates getSouth() const { return CellCoordinates(x, y, z-1); }
	CellCoordinates getSouthWest() const { return CellCoordinates(x, y-1, z-1); }
	
	CellCoordinates getFrontCenter() const { return CellCoordinates(x+1, y, z); }
	CellCoordinates getFrontEast() const { return CellCoordinates(x+1, y+1, z); }
	CellCoordinates getFrontSouthEast() const { return CellCoordinates(x+1, y+1, z-1); }
	CellCoordinates getFrontSouth() const { return CellCoordinates(x+1, y, z-1); }
	CellCoordinates getFrontSouthWest() const { return CellCoordinates(x+1, y-1, z-1); }
	
	bool operator == (const CellCoordinates& c) const { return x == c.x && y == c.y && z == c.z; }
	bool operator != (const CellCoordinates& c) const { return x != c.x || y != c.y || z != c.z; }
};

}

#endif /*CELLCOORDINATES_H_*/
